using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using DAO;
using DTO;

namespace BUS
{
    public class ChiTietPhieuKhamBUS
    {
        public DataTable LayBangChiTietPhieuKham(string maPK)
        {
            DataTable dt = new DataTable(); ;
            ChiTietPhieuKhamDAO ctpkDao = new ChiTietPhieuKhamDAO();
            dt = ctpkDao.LayBangChiTietPhieuKham(maPK);
            return dt;
        }


        public DataTable LayMaChiTietPhieuKham()
        {
            DataTable dt = new DataTable();
            ChiTietPhieuKhamDAO ctpkDao = new ChiTietPhieuKhamDAO();
            dt = ctpkDao.LayMaChiTietPhieuKham();
            return dt;
        }

        public DataTable LayDonGiaThuoc(string maLoaiThuoc, string maDonVi)
        {
            DataTable dt = new DataTable(); ;
            ChiTietPhieuKhamDAO ctpkDao = new ChiTietPhieuKhamDAO();
            dt = ctpkDao.LayDonGiaThuoc(maLoaiThuoc, maDonVi);
            return dt;
        }

        public DataTable TienThuoc(string maPhieuKham)
        {
            DataTable dt = new DataTable(); ;
            ChiTietPhieuKhamDAO ctpkDao = new ChiTietPhieuKhamDAO();
            dt = ctpkDao.TienThuoc(maPhieuKham);
            return dt;
        }

        public void ThemChiTietPhieuKham(ChiTietPhieuKhamDTO ctpkDto)
        {
            ChiTietPhieuKhamDAO ctpkDao = new ChiTietPhieuKhamDAO();
            ctpkDao.ThemChiTietPhieuKham(ctpkDto);
        }

        public void XoaChiTietPhieuKham(string maChiTietPhieuKham)
        {
            ChiTietPhieuKhamDAO ctpkDao = new ChiTietPhieuKhamDAO();
            ctpkDao.XoaChiTietPhieuKham(maChiTietPhieuKham);
        }

        public void SuaChiTietPhieuKham(ChiTietPhieuKhamDTO ctpkDto)
        {
            ChiTietPhieuKhamDAO ctpkDao = new ChiTietPhieuKhamDAO();
            ctpkDao.SuaChiTietPhieuKham(ctpkDto);
        }

        //Tìm kiếm bệnh nhân theo mã bệnh nhân
        public DataTable TraCuuChiTietPhieuKhamTheoMaChiTietPhieuKham(string maChiTietPhieuKham)
        {
            DataTable dt = new DataTable();
            ChiTietPhieuKhamDAO ctpkDao = new ChiTietPhieuKhamDAO();
            dt = ctpkDao.TimKiemTheoMaChiTietPK(maChiTietPhieuKham);
            return dt;
        }
    }
}
